package com.charging.common.exception;


import com.charging.common.constant.HttpStatus;

/**
 * 业务异常
 *
 * 
 */
public class BusinessException extends RuntimeException
{
    private static final long serialVersionUID = 1L;

    /** 错误码 */
    private Integer code;

    /** 错误提示 */
    private String message;

    /**
     * 空构造方法，避免反序列化问题
     */
    public BusinessException()
    {

    }

    public BusinessException(String message)
    {
        this.code = HttpStatus.ERROR;
        this.message = message;
    }

    public BusinessException(Integer code,String message)
    {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

}
